/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.smg.community.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.smg.community.dao.CrmRoleRightDao;
import com.smg.community.model.CrmRoleRight;
import com.smg.community.vo.query.CrmRoleRightQuery;

import javacommon.base.*;

import cn.org.rapid_framework.page.*;


/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */

@Service
public class CrmRoleRightManager extends BaseManager<CrmRoleRight,java.lang.Integer>{
	@Autowired
	private CrmRoleRightDao crmRoleRightDao;
	
	public EntityDao getEntityDao() {
		return this.crmRoleRightDao;
	}
	/**
	 * 获取所有权限
	 * */
	public List<CrmRoleRight> getAll(){
		return crmRoleRightDao.getAll();
	}
	/**
	 * 根据角色id 获取对应权限
	 * */
	public List<CrmRoleRight> getByRoleId(String roleId){
		return crmRoleRightDao.getByRoleId(roleId);
	}
	/**
	 * 根据角色id 删除对应权限
	 * */
	public int deleteByRoleId(String roleId){
		return crmRoleRightDao.deleteByRoleId(roleId);
	}
	public Page findPage(CrmRoleRightQuery query) {
		return crmRoleRightDao.findPage(query);
	}
	
}
